package com.gopay.common.domain.ptbank;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Version;
import java.util.Date;
/**
 * Entity: 银行托管日志表
 */
@Entity
@Table(name = "GSRT_BANK_SUPERVISE_LOG")
public class GsrtBankSuperviseLog implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * ID
	 */
	private Long id;

	/** 
	 * 乐观锁版本号
	 */
	private Long version;
	/**
	 * 银行订单号
	 */
	private String bankOrderId;
	/**
	 * 操作员编号
	 */
	private String operatorId;
	/**
	 * 商户订单号
	 */
	private String merOrderId;

	/** 
	 * 国付宝订单号
	 */
	private String gopayOrderId;

	/** 
	 * 商户ID
	 */
	private String merCustId;

	/** 
	 * 托管银行平台ID
	 */
	private Long bankSuperviseId;
	/**
	 * 银行分配给平台的ID(由平台新增接口，银行返回)
	 */
	private String platId;
	/** 
	 * G商融通银行服务id
	 */
	private String bankServiceId;

	/** 
	 * 标的状态 恒丰（P-审核通过
	R-审核拒绝
	S-待审核
	F-附件已上传）
	
	 */
	private String bidState;

	/** 
	 * 服务类型  01 机构到银行 ；02 银行到机构
	 */
	private String bankType;

	private String bidNo;

	/** 
	 * 创建时间
	 */
	private Date createdTs;

	/** 
	 * 发送银行状态
	已发送：01；
	未发送：02   ；
	发送失败：03 ；
	发送中：04
	 */
	private String bankState;

	/** 
	 * 记录最后修改时间
	 */
	private Date lastUpdTs;
	/**
	 * 请求报文
	 */
	private String reqMsg;

	/** 
	 * 应答报文
	 */
	private String respMsg;
	/**
	 * 应答码
	 */
	private String rspCode;
	/** 
	 * 成功失败描述信息
	 */
	private String remark;

	/** 
	 * 备注2
	 */
	private String remark2;

	/** 
	 * 备注3
	 */
	private String remark3;
	/**
	 * 支付机构标的ID
	 */
	private String proId;
	/**
	 * 银行标的ID(银行返回给国付宝的标的ID)
	 */
	private String bankProId;
	
	public GsrtBankSuperviseLog() {
	}

	public GsrtBankSuperviseLog(Long id, Long version, String bankOrderId, String operatorId, String merOrderId,
								String gopayOrderId, String merCustId, Long bankSuperviseId, String bankServiceId,
								String bidState, String bankType, String bidNo, Date createdTs, String bankState,
								Date lastUpdTs, String reqMsg, String respMsg, String remark, String remark2,
								String remark3) {
		this.id = id;
		this.version = version;
		this.bankOrderId = bankOrderId;
		this.operatorId = operatorId;
		this.merOrderId = merOrderId;
		this.gopayOrderId = gopayOrderId;
		this.merCustId = merCustId;
		this.bankSuperviseId = bankSuperviseId;
		this.bankServiceId = bankServiceId;
		this.bidState = bidState;
		this.bankType = bankType;
		this.bidNo = bidNo;
		this.createdTs = createdTs;
		this.bankState = bankState;
		this.lastUpdTs = lastUpdTs;
		this.reqMsg = reqMsg;
		this.respMsg = respMsg;
		this.remark = remark;
		this.remark2 = remark2;
		this.remark3 = remark3;
	}

	@Id
	@SequenceGenerator(name = "GsrtBankSuperviseLogSequence", sequenceName = "GSRT_BANK_SUPERVISE_LOG_SEQ")
	@GeneratedValue(generator = "GsrtBankSuperviseLogSequence", strategy = GenerationType.SEQUENCE)
	@Column(name = "ID", unique = true, nullable = false, precision = 22, scale = 0)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Version
	@Column(name = "VERSION", precision = 22, scale = 0)
	public Long getVersion() {
		return this.version;
	}

	public void setVersion(Long version) {
		this.version = version;
	}

	@Column(name = "BANK_ORDER_ID", length = 60)
	public String getBankOrderId() {
		return this.bankOrderId;
	}

	public void setBankOrderId(String bankOrderId) {
		this.bankOrderId = bankOrderId;
	}

	@Column(name = "OPERATOR_ID", length = 40)
	public String getOperatorId() {
		return this.operatorId;
	}

	public void setOperatorId(String operatorId) {
		this.operatorId = operatorId;
	}

	@Column(name = "MER_ORDER_ID", nullable = false, length = 50)
	public String getMerOrderId() {
		return this.merOrderId;
	}

	public void setMerOrderId(String merOrderId) {
		this.merOrderId = merOrderId;
	}

	@Column(name = "GOPAY_ORDER_ID", nullable = false, length = 50)
	public String getGopayOrderId() {
		return this.gopayOrderId;
	}

	public void setGopayOrderId(String gopayOrderId) {
		this.gopayOrderId = gopayOrderId;
	}

	@Column(name = "MER_CUST_ID", nullable = false, length = 10)
	public String getMerCustId() {
		return this.merCustId;
	}

	public void setMerCustId(String merCustId) {
		this.merCustId = merCustId;
	}

	@Column(name = "BANK_SUPERVISE_ID", nullable = true, precision = 22, scale = 0)
	public Long getBankSuperviseId() {
		return this.bankSuperviseId;
	}

	public void setBankSuperviseId(Long bankSuperviseId) {
		this.bankSuperviseId = bankSuperviseId;
	}

	@Column(name = "BANK_SERVICE_ID")
	public String getBankServiceId() {
		return this.bankServiceId;
	}

	public void setBankServiceId(String bankServiceId) {
		this.bankServiceId = bankServiceId;
	}

	@Column(name = "BID_STATE", length = 10)
	public String getBidState() {
		return this.bidState;
	}

	public void setBidState(String bidState) {
		this.bidState = bidState;
	}

	@Column(name = "BANK_TYPE", length = 4)
	public String getBankType() {
		return this.bankType;
	}

	public void setBankType(String bankType) {
		this.bankType = bankType;
	}

	@Column(name = "BID_NO", length = 60)
	public String getBidNo() {
		return this.bidNo;
	}

	public void setBidNo(String bidNo) {
		this.bidNo = bidNo;
	}

	@Column(name = "CREATED_TS", nullable = false)
	public Date getCreatedTs() {
		return this.createdTs;
	}

	public void setCreatedTs(Date createdTs) {
		this.createdTs = createdTs;
	}

	@Column(name = "BANK_STATE", nullable = false, length = 20)
	public String getBankState() {
		return this.bankState;
	}

	public void setBankState(String bankState) {
		this.bankState = bankState;
	}

	@Column(name = "LAST_UPD_TS", nullable = false)
	public Date getLastUpdTs() {
		return this.lastUpdTs;
	}

	public void setLastUpdTs(Date lastUpdTs) {
		this.lastUpdTs = lastUpdTs;
	}

	@Column(name = "REQ_MSG", length = 4000)
	public String getReqMsg() {
		return this.reqMsg;
	}

	public void setReqMsg(String reqMsg) {
		this.reqMsg = reqMsg;
	}

	@Column(name = "RESP_MSG", length = 4000)
	public String getRespMsg() {
		return this.respMsg;
	}

	public void setRespMsg(String respMsg) {
		this.respMsg = respMsg;
	}

	@Column(name = "REMARK", length = 600)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "REMARK2", length = 50)
	public String getRemark2() {
		return this.remark2;
	}

	public void setRemark2(String remark2) {
		this.remark2 = remark2;
	}

	@Column(name = "REMARK3", length = 50)
	public String getRemark3() {
		return this.remark3;
	}

	public void setRemark3(String remark3) {
		this.remark3 = remark3;
	}

	@Column(name = "PLATID", length = 80)
	public String getPlatId() {
		return platId;
	}

	public void setPlatId(String platId) {
		this.platId = platId;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.DEFAULT_STYLE);
	}
	@Column(name = "RSP_CODE", length = 10)
	public String getRspCode() {
		return rspCode;
	}

	public void setRspCode(String rspCode) {
		this.rspCode = rspCode;
	}
	@Column(name = "PROID", length = 20)
	public String getProId() {
		return proId;
	}

	public void setProId(String proId) {
		this.proId = proId;
	}
	@Column(name = "BANKPROID", length = 32)
	public String getBankProId() {
		return bankProId;
	}

	public void setBankProId(String bankProId) {
		this.bankProId = bankProId;
	}

}
